from tkinter import *
coords = [0,0, 0,20, 30,20, 30,0, 20,0, 20,10, 10,10, 10,0]

x = int(input('Введите стартовый X '))
y = int(input('Введите стартовый Y '))
n = int(input('Введите коэффициент увелечения '))

if n==0 and x >= 0 and y >= 0 and x <= 500 and y <= 500:
    pass
else:
    if n>0 and 0*n+x >= 0 and 0*n+y >= 0 and 30*n+x <= 500 and 20*n+y <= 500:
        pass
    else:
        if n<0 and 30*n+x >= 0 and 20*n+y >= 0 and 0*n+x <= 500 and 0*n+y <= 500:
            pass
        else:
            print('Ошибка, введены неправильные координаты или коэффициент')
            exit()

root = Tk()
root.geometry('500x500')
root.title('ИТ-Марафон')

canvas = Canvas(bg='white', height=500, width=500)
canvas.pack(anchor=CENTER, expand=1)

canvas.create_polygon(coords[0] *n+x, coords[1] *n+y,
                    coords[2] *n+x, coords[3] *n+y,
                    coords[4] *n+x, coords[5] *n+y,
                    coords[6] *n+x, coords[7] *n+y,
                    coords[8] *n+x, coords[9] *n+y,
                    coords[10] *n+x, coords[11] *n+y,
                    coords[12] *n+x, coords[13] *n+y,
                    coords[14] *n+x, coords[15] *n+y)

root.mainloop()
